﻿<%@ Page Language="C#" MasterPageFile="~/Admin/AdminMasterPage.master" AutoEventWireup="true"
    CodeFile="ManageDB.aspx.cs" Inherits="Admin_ManageDB" Title="Admin Page - Information Literacy Education" %>

<%@ Register TagPrefix="uc" TagName="UpdateProgress" Src="~/UserControls/UpdateProgress.ascx" %>
<%@ Register TagPrefix="uc" TagName="ModalPopupMessage" Src="~/UserControls/ModalPopupMessage.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" runat="Server">
    <uc:UpdateProgress ID="updateProgress" runat="server" />
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <uc:ModalPopupMessage ID="ModalPopupMessage" runat="server" />
        </ContentTemplate>
    </asp:UpdatePanel>

    <script language="javascript" type="text/javascript">
        function Toggle(id)
        {
            var target = document.getElementById(id);
            if ( target.style.display == "none" )
            {
                target.style.display = "";
            }
            else
            {
                target.style.display = "none";
            }
            return;
        }
        
    </script>

    <h1>
        Database Administration Page</h1>
    <br />
    <asp:UpdatePanel ID="UpdatePanel4" runat="server">
        <ContentTemplate>
            <asp:Button ID="btnOpenAddToDB" runat="server" Text="Add to Database" Width="150"
                OnClick="btnOpenAddToDB_Click" />&nbsp;&nbsp;
            <asp:Button ID="btnOpenModifyDB" runat="server" Text="Modify Database" Width="150"
                OnClick="btnOpenModifyDB_Click" />&nbsp;&nbsp;
            <%--<asp:Button ID="btnOpenDeleteFromDB" runat="server" Text="Delete From Database" Width="200"
                OnClick="btnOpenDeleteFromDB_Click" />--%>
            <br />
            <br />
            <asp:MultiView ID="MultiViewDB" runat="server">
                <asp:View ID="ViewAddToDB" runat="server">
                    <h2>
                        Add to Database</h2>
                    <div style="margin-left: 20px;">
                        <h3>
                            Add a Student Manually
                        </h3>
                        <div style="margin-left: 20px;">
                            <table>
                                <tr>
                                    <td class="tableLeftHeader">
                                        Account Type :
                                    </td>
                                    <td class="tableItem">
                                        <asp:RadioButtonList ID="rdobtnsAddAccountType" runat="server" RepeatDirection="Horizontal"
                                            OnSelectedIndexChanged="rdobtnsAddAccountType_SelectedIndexChanged" AutoPostBack="true">
                                            <asp:ListItem Selected="True" Value="Student">Institute Student</asp:ListItem>
                                            <asp:ListItem Value="NonInstitut">Non-Institute Student</asp:ListItem>
                                        </asp:RadioButtonList>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="tableLeftHeader">
                                        Network ID * :
                                    </td>
                                    <td class="tableItem">
                                        <asp:TextBox ID="txtAddNetworkID" runat="server" ValidationGroup="AddUser" MaxLength="100" />
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Network ID is required."
                                            Display="Dynamic" ControlToValidate="txtAddNetworkID" ValidationGroup="AddUser">*</asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="tableLeftHeader">
                                        Student ID Number * :
                                    </td>
                                    <td class="tableItem">
                                        <asp:TextBox ID="txtAddIdNumber" runat="server" ValidationGroup="AddUser" MaxLength="50" />
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="ID Number is required."
                                            Display="Dynamic" ControlToValidate="txtAddIdNumber" ValidationGroup="AddUser">*</asp:RequiredFieldValidator>
                                        &nbsp; <span style="font-size: smaller; font-style: italic;">ID number format : 0xxxxxxxx</span>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="tableLeftHeader">
                                        First Name * :
                                    </td>
                                    <td class="tableItem">
                                        <asp:TextBox ID="txtAddFirstName" runat="server" ValidationGroup="AddUser" MaxLength="50" />
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="First Name is required."
                                            Display="Dynamic" ControlToValidate="txtAddFirstName" ValidationGroup="AddUser">*</asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="tableLeftHeader">
                                        Last Name * :
                                    </td>
                                    <td class="tableItem">
                                        <asp:TextBox ID="txtAddLastName" runat="server" ValidationGroup="AddUser" MaxLength="50" />
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="Last Name is required."
                                            Display="Dynamic" ControlToValidate="txtAddLastName" ValidationGroup="AddUser">*</asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="tableLeftHeader">
                                        Email * :
                                    </td>
                                    <td class="tableItem">
                                        <asp:TextBox ID="txtAddEmail" runat="server" ValidationGroup="AddUser" MaxLength="100" />
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="Email is required."
                                            Display="Dynamic" ControlToValidate="txtAddEmail" ValidationGroup="AddUser">*</asp:RequiredFieldValidator>
                                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="Not a Vaild Email Address"
                                            ControlToValidate="txtAddEmail" Display="Dynamic" ValidationGroup="AddUser"></asp:RegularExpressionValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="tableLeftHeader">
                                        Year :
                                    </td>
                                    <td class="tableItem">
                                        <asp:DropDownList ID="ddlistAddYear" runat="server">
                                            <asp:ListItem Value="0" Selected="True">Other</asp:ListItem>
                                            <asp:ListItem Value="1">Freshman</asp:ListItem>
                                            <asp:ListItem Value="2">Sophomore</asp:ListItem>
                                            <asp:ListItem Value="3">Junior</asp:ListItem>
                                            <asp:ListItem Value="4">Senior</asp:ListItem>
                                            <asp:ListItem Value="5">Graduate Student</asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <asp:Panel ID="PanelAddNonInstitute" runat="server" Visible="false">
                                    <tr>
                                        <td class="tableLeftHeader">
                                            Password * :
                                        </td>
                                        <td class="tableItem">
                                            <asp:TextBox ID="txtAddPassword" runat="server" TextMode="Password" ValidationGroup="AddUser" />
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ErrorMessage="Password is required."
                                                Display="Dynamic" ControlToValidate="txtAddPassword" ValidationGroup="AddUser">*</asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tableLeftHeader">
                                            Security Questions * :
                                        </td>
                                        <td class="tableItem">
                                            <asp:TextBox ID="txtAddSecurityQuestion" runat="server" ValidationGroup="AddUser"
                                                MaxLength="50" />
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ErrorMessage="Security Question is required."
                                                Display="Dynamic" ControlToValidate="txtAddSecurityQuestion" ValidationGroup="AddUser">*</asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tableLeftHeader">
                                            Security Answer * :
                                        </td>
                                        <td class="tableItem">
                                            <asp:TextBox ID="txtAddSecurityAnswer" runat="server" ValidationGroup="AddUser" MaxLength="20" />
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ErrorMessage="Security Answer is required."
                                                Display="Dynamic" ControlToValidate="txtAddSecurityAnswer" ValidationGroup="AddUser">*</asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                </asp:Panel>
                                <tr>
                                    <td>
                                    </td>
                                    <td class="tableItem">
                                        <br />
                                        <asp:Button ID="btnAddUser" runat="server" Text="Add Student" ValidationGroup="AddUser"
                                            OnClick="btnAddUser_Click" />
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                </asp:View>
                <asp:View ID="ViewModifyDB" runat="server">
                    <h2>
                        Modify Database</h2>
                    <div style="margin-left: 20px;">
                        <h3 onclick="Toggle('submissions');" style="cursor: pointer; text-decoration: underline;">
                            Modify Assignment Submissions
                        </h3>
                        <div id="submissions" style="margin-left: 20px;">
                            <h4>
                                Submissions
                            </h4>
                            <div style="margin-left: 10px;">
                                <h5>
                                    Filter By:</h5>
                                <table>
                                    <tr>
                                        <td class="tableLeftHeader">
                                            Type * :
                                        </td>
                                        <td class="tableItem">
                                            <asp:RadioButtonList ID="rdobtnsModifyAssignmentType" runat="server" RepeatDirection="Horizontal"
                                                AutoPostBack="true" OnSelectedIndexChanged="rdobtnsModifyAssignmentType_SelectedIndexChanged">
                                                <asp:ListItem Selected="True">Quiz</asp:ListItem>
                                                <asp:ListItem>Essay</asp:ListItem>
                                            </asp:RadioButtonList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tableLeftHeader">
                                            Class :
                                        </td>
                                        <td class="tableItem">
                                            <asp:DropDownList ID="ddlistModifyClasses" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlistModifyClasses_SelectedIndexChanged">
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tableLeftHeader">
                                            Section # :
                                        </td>
                                        <td class="tableItem">
                                            <asp:DropDownList ID="ddlistModifySections" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlistModifySections_SelectedIndexChanged">
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tableLeftHeader">
                                            Standard * :
                                        </td>
                                        <td class="tableItem">
                                            <asp:RadioButtonList ID="rdobtnsModifyStandards" runat="server" RepeatDirection="Horizontal"
                                                AutoPostBack="true" OnSelectedIndexChanged="rdobtnsModifyStandards_SelectedIndexChanged">
                                                <asp:ListItem Selected="True" Value="1">Getting Started</asp:ListItem>
                                                <asp:ListItem Value="2">Finding Sources</asp:ListItem>
                                                <asp:ListItem Value="3">Evaluating Sources</asp:ListItem>
                                                <asp:ListItem Value="4">Writing with Sources</asp:ListItem>
                                                <asp:ListItem Value="0">All</asp:ListItem>
                                            </asp:RadioButtonList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tableLeftHeader">
                                            Assignment :
                                        </td>
                                        <td class="tableItem">
                                            <asp:DropDownList ID="ddlistModifyAssignments" runat="server" Enabled="false">
                                                <asp:ListItem>--- Select Class First ---</asp:ListItem>
                                            </asp:DropDownList>
                                            <asp:Label ID="lblModifyAssignmentDueDate" runat="server" Visible="false" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tableLeftHeader">
                                            Network ID :
                                        </td>
                                        <td class="tableItem">
                                            <asp:TextBox ID="txtModifyUsername" runat="server" MaxLength="50"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tableLeftHeader">
                                            Last Name :
                                        </td>
                                        <td class="tableItem">
                                            <asp:TextBox ID="txtModifyLastName" runat="server" MaxLength="50"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                        <td class="tableItem">
                                            <br />
                                            <asp:Button ID="btnModifyFindSubmissions" runat="server" Text="Find Submissions"
                                                OnClick="btnModifyFindSubmissions_Click" />
                                        </td>
                                    </tr>
                                </table>
                                <br />
                                <asp:Repeater ID="RepeaterQuizSubmissions" runat="server" Visible="false" OnItemDataBound="RepeaterQuizSubmissions_ItemDataBound">
                                    <HeaderTemplate>
                                        <h4>
                                            Results for Quiz Submissions
                                        </h4>
                                        <table cellpadding="0" cellspacing="0" style="min-width: 600px;">
                                            <tr>
                                                <td colspan="7" style="padding: 10px;">
                                                    <asp:Button ID="btnHeaderDelete" runat="server" Text="Delete" OnClick="btnQuizDelete_Click" />
                                                    <ajaxToolkit:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" TargetControlID="btnHeaderDelete"
                                                        ConfirmText="Are you sure you want to delete selected quiz submissions?" />
                                                    &nbsp;&nbsp;
                                                    <asp:Button ID="btnHeaderMoveTo" runat="server" Text="Move to" OnClick="btnModifyQuizOpenMoveTo_Click" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tableTopHeader">
                                                </td>
                                                <td class="tableTopHeader">
                                                    <asp:LinkButton ID="lnkbtnHeaderNetworkID" runat="server" CommandName="SortByNetworkID"
                                                        CommandArgument="Ascend" OnCommand="lnkbtnQuizHeaderSort_Command">Network ID</asp:LinkButton>
                                                </td>
                                                <td class="tableTopHeader">
                                                    <asp:LinkButton ID="lnkbtnHeaderLastName" runat="server" CommandName="SortByLastName"
                                                        CommandArgument="Ascend" OnCommand="lnkbtnQuizHeaderSort_Command">Last Name</asp:LinkButton>
                                                </td>
                                                <td class="tableTopHeader">
                                                    <asp:LinkButton ID="lnkbtnHeaderFirstName" runat="server" CommandName="SortByFirstName"
                                                        CommandArgument="Ascend" OnCommand="lnkbtnQuizHeaderSort_Command">First Name</asp:LinkButton>
                                                </td>
                                                <td class="tableTopHeader">
                                                    <asp:LinkButton ID="lnkbtnHeaderAttempts" runat="server" CommandName="SortByAttempts"
                                                        CommandArgument="Ascend" OnCommand="lnkbtnQuizHeaderSort_Command">Attempts</asp:LinkButton>
                                                </td>
                                                <td class="tableTopHeader">
                                                    <asp:LinkButton ID="lnkbtnHeaderGrade" runat="server" CommandName="SortByGrade" CommandArgument="Ascend"
                                                        OnCommand="lnkbtnQuizHeaderSort_Command">Grade</asp:LinkButton>
                                                </td>
                                                <td class="tableTopHeader">
                                                    <asp:LinkButton ID="lnkbtnHeaderSubmittedTime" runat="server" CommandName="SortBySubmittedTime"
                                                        CommandArgument="Ascend" OnCommand="lnkbtnQuizHeaderSort_Command">Submitted 
                                                    Time</asp:LinkButton>
                                                </td>
                                            </tr>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <tr style="height: 25px;">
                                            <td>
                                                <asp:CheckBox ID="chkboxQuizSubmission" runat="server" CssClass="HiddenText" AutoPostBack="true"
                                                    OnCheckedChanged="chkboxQuizSubmission_CheckedChanged" />
                                            </td>
                                            <td>
                                                <asp:Label ID="lblNetworkID" runat="server" />
                                            </td>
                                            <td>
                                                <asp:Label ID="lblLastName" runat="server" />
                                            </td>
                                            <td>
                                                <asp:Label ID="lblFirstName" runat="server" />
                                            </td>
                                            <td style="text-align: center;">
                                                <asp:Label ID="lblAttempts" runat="server" />
                                            </td>
                                            <td style="text-align: center;">
                                                <asp:Label ID="lblGrade" runat="server" />
                                            </td>
                                            <td style="text-align: center;">
                                                <asp:Label ID="lblSubmittedTime" runat="server" />
                                            </td>
                                        </tr>
                                    </ItemTemplate>
                                    <FooterTemplate>
                                        <tr>
                                            <td colspan="7" style="padding: 10px;">
                                                <asp:Button ID="btnFooterDelete" runat="server" Text="Delete" OnClick="btnQuizDelete_Click" />
                                                <ajaxToolkit:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" TargetControlID="btnFooterDelete"
                                                    ConfirmText="Are you sure you want to delete selected quiz submissions?" />
                                                &nbsp;&nbsp;
                                                <asp:Button ID="btnFooterMoveTo" runat="server" Text="Move to" OnClick="btnModifyQuizOpenMoveTo_Click" />
                                            </td>
                                        </tr>
                                        </table>
                                    </FooterTemplate>
                                </asp:Repeater>
                                <asp:Repeater ID="RepeaterEssaySubmissions" runat="server" Visible="false" OnItemDataBound="RepeaterEssaySubmissions_ItemDataBound">
                                    <HeaderTemplate>
                                        <h4>
                                            Results for Essay Submissions
                                        </h4>
                                        <table cellpadding="0" cellspacing="0" style="min-width: 600px;">
                                            <tr>
                                                <td colspan="7" style="padding: 10px;">
                                                    <asp:Button ID="btnHeaderDelete" runat="server" Text="Delete" OnClick="btnEssayDelete_Click" />
                                                    <ajaxToolkit:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" TargetControlID="btnHeaderDelete"
                                                        ConfirmText="Are you sure you want to delete selected essay submissions?" />
                                                    &nbsp;&nbsp;
                                                    <asp:Button ID="btnHeaderMoveTo" runat="server" Text="Move to" OnClick="btnModifyEssayOpenMoveTo_Click" />
                                                    &nbsp;&nbsp;
                                                    <asp:Button ID="btnHeaderChangeToSaved" runat="server" Text="Change to Saved" OnClick="btnEssayChangeToSaved_Click" />
                                                    <ajaxToolkit:ConfirmButtonExtender ID="ConfirmButtonExtender2" runat="server" TargetControlID="btnHeaderChangeToSaved"
                                                        ConfirmText="Are you sure you want to change the selected essay submissions' status to saved?" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tableTopHeader">
                                                </td>
                                                <td class="tableTopHeader">
                                                    <asp:LinkButton ID="lnkbtnHeaderNetworkID" runat="server" CommandArgument="NetworkID">Network 
                                                    ID</asp:LinkButton>
                                                </td>
                                                <td class="tableTopHeader">
                                                    <asp:LinkButton ID="lnkbtnHeaderLastName" runat="server" CommandArgument="LastName">Last 
                                                    Name</asp:LinkButton>
                                                </td>
                                                <td class="tableTopHeader">
                                                    <asp:LinkButton ID="lnkbtnHeaderFirstName" runat="server" CommandArgument="FirstName">First 
                                                    Name</asp:LinkButton>
                                                </td>
                                                <td class="tableTopHeader">
                                                    <asp:LinkButton ID="lnkbtnHeaderIsFinal" runat="server" CommandArgument="IsFinal">Is 
                                                    Final</asp:LinkButton>
                                                </td>
                                                <td class="tableTopHeader">
                                                    <asp:LinkButton ID="lnkbtnHeaderGrade" runat="server" CommandArgument="Grade">Grade</asp:LinkButton>
                                                </td>
                                                <td class="tableTopHeader">
                                                    <asp:LinkButton ID="lnkbtnHeaderSubmittedTime" runat="server" CommandArgument="SubmittedTime">Submitted 
                                                    Time</asp:LinkButton>
                                                </td>
                                            </tr>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <tr style="height: 25px;">
                                            <td>
                                                <asp:CheckBox ID="chkboxEssaySubmission" runat="server" CssClass="HiddenText" AutoPostBack="true"
                                                    OnCheckedChanged="chkboxEssaySubmission_CheckedChanged" />
                                            </td>
                                            <td>
                                                <asp:Label ID="lblNetworkID" runat="server" />
                                            </td>
                                            <td>
                                                <asp:Label ID="lblLastName" runat="server" />
                                            </td>
                                            <td>
                                                <asp:Label ID="lblFirstName" runat="server" />
                                            </td>
                                            <td style="text-align: center;">
                                                <asp:CheckBox ID="chkboxIsFinal" runat="server" Enabled="false" />
                                            </td>
                                            <td style="text-align: center;">
                                                <asp:Label ID="lblGrade" runat="server" />
                                            </td>
                                            <td style="text-align: center;">
                                                <asp:Label ID="lblSubmittedTime" runat="server" />
                                            </td>
                                        </tr>
                                    </ItemTemplate>
                                    <FooterTemplate>
                                        <tr>
                                            <td colspan="7" style="padding: 10px;">
                                                <asp:Button ID="btnFooterDelete" runat="server" Text="Delete" OnClick="btnEssayDelete_Click" />
                                                <ajaxToolkit:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" TargetControlID="btnFooterDelete"
                                                    ConfirmText="Are you sure you want to delete selected essay submissions?" />
                                                &nbsp;&nbsp;
                                                <asp:Button ID="btnFooterMoveTo" runat="server" Text="Move to" OnClick="btnModifyEssayOpenMoveTo_Click" />
                                                &nbsp;&nbsp;
                                                <asp:Button ID="btnFooterChangeToSaved" runat="server" Text="Change to Saved" OnClick="btnEssayChangeToSaved_Click" />
                                                <ajaxToolkit:ConfirmButtonExtender ID="ConfirmButtonExtender2" runat="server" TargetControlID="btnFooterChangeToSaved"
                                                    ConfirmText="Are you sure you want to change the selected essay submissions' status to saved?" />
                                            </td>
                                        </tr>
                                        </table>
                                    </FooterTemplate>
                                </asp:Repeater>
                            </div>
                        </div>
                        <h3 onclick="Toggle('students');" style="cursor: pointer; text-decoration: underline;">
                            Move Students
                        </h3>
                        <div id="students" style="margin-left: 20px;">
                            <h4>
                                Find Student</h4>
                            <div class="indent20">
                                <table>
                                    <tr>
                                        <td class="tableLeftHeader">
                                            Network ID :
                                        </td>
                                        <td class="tableItem">
                                            <asp:TextBox ID="txtModifyStudentNetworkID" runat="server" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                        <td>
                                            <asp:Button ID="btnModifyStudentFind" runat="server" Text="Find Student" OnClick="btnModifyStudentFind_Click" />
                                        </td>
                                    </tr>
                                </table>
                                <br />
                                <br />
                                <h5>
                                    Results</h5>
                                <asp:ObjectDataSource ID="ObjectDataSourceStudent" runat="server" OldValuesParameterFormatString="original_{0}"
                                    SelectMethod="GetUserByUserID" TypeName="UsersBLL">
                                    <SelectParameters>
                                        <asp:SessionParameter Name="UserID" SessionField="StudentUserID" Type="Int32" />
                                    </SelectParameters>
                                </asp:ObjectDataSource>
                                <asp:DetailsView ID="DetailsViewStudent" runat="server" AutoGenerateRows="False"
                                    CellPadding="4" DataSourceID="ObjectDataSourceStudent" ForeColor="#333333" GridLines="None"
                                    Width="430px">
                                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                    <CommandRowStyle BackColor="#E2DED6" Font-Bold="True" />
                                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                    <FieldHeaderStyle BackColor="#E9ECF1" Font-Bold="True" />
                                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                    <Fields>
                                        <asp:BoundField DataField="UserID" HeaderText="UserID" SortExpression="UserID" />
                                        <asp:BoundField DataField="Username" HeaderText="Username" SortExpression="Username" />
                                        <asp:BoundField DataField="AccountType" HeaderText="AccountType" SortExpression="AccountType" />
                                        <asp:BoundField DataField="FirstName" HeaderText="FirstName" SortExpression="FirstName" />
                                        <asp:BoundField DataField="LastName" HeaderText="LastName" SortExpression="LastName" />
                                        <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
                                        <asp:BoundField DataField="StudentIDNumber" HeaderText="StudentIDNumber" SortExpression="StudentIDNumber" />
                                        <asp:CheckBoxField DataField="IsEnabled" HeaderText="IsEnabled" SortExpression="IsEnabled" />
                                        <asp:BoundField DataField="Year" HeaderText="Year" SortExpression="Year" />
                                    </Fields>
                                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                    <EditRowStyle BackColor="#999999" />
                                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                </asp:DetailsView>
                                <br />
                                <br />
                                <asp:Repeater ID="rptrStudentClassList" runat="server" OnItemDataBound="rptrStudentClassList_ItemDataBound">
                                    <HeaderTemplate>
                                        <table class="table" style="width: 93%; margin-left: 20px;">
                                            <tr>
                                                <td class="tableTopHeader" style="width: 15px; height: 30px;">
                                                </td>
                                                <td class="tableTopHeader" style="width: 65%;">
                                                    Course
                                                </td>
                                                <td class="tableTopHeader" style="width: 28%;">
                                                    Section
                                                </td>
                                            </tr>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <tr style="background-color: #EEEEEE;">
                                            <td class="tableItem">
                                            </td>
                                            <td class="tableItem" style="height: 30px; vertical-align: middle;">
                                                <div style="margin-left: 10px; font-weight: bold; font-size: 11pt;">
                                                    <asp:HyperLink ID="lnkCourseTitle" runat="server" />
                                                </div>
                                            </td>
                                            <td class="tableItem" style="text-align: center;">
                                                <asp:Label ID="lblSection" runat="server" />
                                            </td>
                                        </tr>
                                    </ItemTemplate>
                                    <AlternatingItemTemplate>
                                        <tr style="background-color: #FFFFFF;">
                                            <td class="tableItem">
                                            </td>
                                            <td class="tableItem" style="height: 30px; vertical-align: middle;">
                                                <div style="margin-left: 10px; font-weight: bold; font-size: 11pt;">
                                                    <asp:HyperLink ID="lnkCourseTitle" runat="server" />
                                                </div>
                                            </td>
                                            <td class="tableItem" style="text-align: center;">
                                                <asp:Label ID="lblSection" runat="server" />
                                            </td>
                                        </tr>
                                    </AlternatingItemTemplate>
                                    <FooterTemplate>
                                        </table>
                                    </FooterTemplate>
                                </asp:Repeater>
                            </div>
                        </div>
                    </div>
                </asp:View>
                <%--<asp:View ID="ViewDeleteFromDB" runat="server">
                    <h2>
                        Delete from Database</h2>
                    <h3>
                        Coming soon</h3>
                </asp:View>--%>
            </asp:MultiView>
            <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtenderModifyQuizMoveTo" runat="server"
                BackgroundCssClass="modalBackground" TargetControlID="btnHiddenModifyQuizMoveTo"
                PopupControlID="PanelModifyQuizMoveTo" CancelControlID="btnModifyQuizMoveToCancel"
                DropShadow="true" PopupDragHandleControlID="PanelModifyQuizMoveToTitle">
            </ajaxToolkit:ModalPopupExtender>
            <asp:Panel ID="PanelModifyQuizMoveTo" runat="server" Width="600" CssClass="modalPopup"
                Style="display: none">
                <asp:Panel ID="PanelModifyQuizMoveToTitle" runat="server">
                    <div class="modalPopupTitle">
                        Move Quiz Submissions
                    </div>
                </asp:Panel>
                <div class="modalPopupContext" style="font-size: small; text-align: center;">
                    <table style="width: 600px;">
                        <tr>
                            <td style="text-align: center;">
                                <h4 style="text-align: center;">
                                    Move To Class and Section
                                </h4>
                                <asp:UpdatePanel ID="UpdatePanel3" runat="server">
                                    <ContentTemplate>
                                        <table>
                                            <tr>
                                                <td class="tableLeftHeader">
                                                    Class * :
                                                </td>
                                                <td class="tableItem">
                                                    <asp:DropDownList ID="ddlistModifyQuizMoveToClass" runat="server" AutoPostBack="true"
                                                        OnSelectedIndexChanged="ddlistModifyQuizMoveToClass_SelectedIndexChanged" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tableLeftHeader">
                                                    Section * :
                                                </td>
                                                <td class="tableItem">
                                                    <asp:DropDownList ID="ddlistModifyQuizMoveToSection" runat="server" />
                                                </td>
                                            </tr>
                                        </table>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: center;">
                                <asp:Button ID="btnModifyQuizMoveTo" runat="server" Text="Move Submissions" OnClick="btnModifyQuizMoveTo_Click" />
                            </td>
                        </tr>
                    </table>
                </div>
                <div class="Hidden">
                    <asp:Button ID="btnHiddenModifyQuizMoveTo" runat="server" Text="" />
                </div>
                <div class="modalPopupBottom">
                    <asp:Button ID="btnModifyQuizMoveToCancel" runat="server" Width="150" Text="Done" />
                </div>
            </asp:Panel>
            <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtenderModifyEssayMoveTo" runat="server"
                BackgroundCssClass="modalBackground" TargetControlID="btnHiddenModifyEssayMoveTo"
                PopupControlID="PanelModifyEssayMoveTo" CancelControlID="btnModifyEssayMoveToCancel"
                DropShadow="true" PopupDragHandleControlID="PanelModifyEssayMoveToTitle">
            </ajaxToolkit:ModalPopupExtender>
            <asp:Panel ID="PanelModifyEssayMoveTo" runat="server" Width="600" CssClass="modalPopup"
                Style="display: none">
                <asp:Panel ID="PanelModifyEssayMoveToTitle" runat="server">
                    <div class="modalPopupTitle">
                        Move Essay Submissions
                    </div>
                </asp:Panel>
                <div class="modalPopupContext" style="font-size: small; text-align: center;">
                    <table style="width: 600px;">
                        <tr>
                            <td style="text-align: center;">
                                <h4 style="text-align: center;">
                                    Move To Class and Section
                                </h4>
                                <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                                    <ContentTemplate>
                                        <table>
                                            <tr>
                                                <td class="tableLeftHeader">
                                                    Class * :
                                                </td>
                                                <td class="tableItem">
                                                    <asp:DropDownList ID="ddlistModifyEssayMoveToClass" runat="server" AutoPostBack="true"
                                                        OnSelectedIndexChanged="ddlistModifyEssayMoveToClass_SelectedIndexChanged" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tableLeftHeader">
                                                    Section * :
                                                </td>
                                                <td class="tableItem">
                                                    <asp:DropDownList ID="ddlistModifyEssayMoveToSection" runat="server" />
                                                </td>
                                            </tr>
                                        </table>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: center;">
                                <asp:Button ID="btnModifyEssayMoveTo" runat="server" Text="Move Submissions" OnClick="btnModifyEssayMoveTo_Click" />
                            </td>
                        </tr>
                    </table>
                </div>
                <div class="Hidden">
                    <asp:Button ID="btnHiddenModifyEssayMoveTo" runat="server" Text="" />
                </div>
                <div class="modalPopupBottom">
                    <asp:Button ID="btnModifyEssayMoveToCancel" runat="server" Width="150" Text="Done" />
                </div>
            </asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
